package request

import (
	"gitee.com/cjsn/topsdk/util"
)

type TmallServicecenterWorkcardExpressorderConsignRequest struct {
	/*
	   物流寄件单号（废弃）     */
	ExpressOrderId *int64 `json:"express_order_id,omitempty" required:"false" `
	/*
	   工单List     */
	WorkcardIdList *[]int64 `json:"workcard_id_list" required:"true" `
	/*
	   物流订单号     */
	LogisticsOrderId *int64 `json:"logistics_order_id,omitempty" required:"false" `
	/*
	   真实接单服务商     */
	RealTpNick *string `json:"real_tp_nick,omitempty" required:"false" `
}

func (s *TmallServicecenterWorkcardExpressorderConsignRequest) SetExpressOrderId(v int64) *TmallServicecenterWorkcardExpressorderConsignRequest {
	s.ExpressOrderId = &v
	return s
}
func (s *TmallServicecenterWorkcardExpressorderConsignRequest) SetWorkcardIdList(v []int64) *TmallServicecenterWorkcardExpressorderConsignRequest {
	s.WorkcardIdList = &v
	return s
}
func (s *TmallServicecenterWorkcardExpressorderConsignRequest) SetLogisticsOrderId(v int64) *TmallServicecenterWorkcardExpressorderConsignRequest {
	s.LogisticsOrderId = &v
	return s
}
func (s *TmallServicecenterWorkcardExpressorderConsignRequest) SetRealTpNick(v string) *TmallServicecenterWorkcardExpressorderConsignRequest {
	s.RealTpNick = &v
	return s
}

func (req *TmallServicecenterWorkcardExpressorderConsignRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.ExpressOrderId != nil {
		paramMap["express_order_id"] = *req.ExpressOrderId
	}
	if req.WorkcardIdList != nil {
		paramMap["workcard_id_list"] = util.ConvertBasicList(*req.WorkcardIdList)
	}
	if req.LogisticsOrderId != nil {
		paramMap["logistics_order_id"] = *req.LogisticsOrderId
	}
	if req.RealTpNick != nil {
		paramMap["real_tp_nick"] = *req.RealTpNick
	}
	return paramMap
}

func (req *TmallServicecenterWorkcardExpressorderConsignRequest) ToFileMap() map[string]interface{} {
	fileMap := make(map[string]interface{})
	return fileMap
}
